<?php
namespace mvc\validator;

class RequiredValidator extends Validator
{
    public function validate()
    {
        if ($this->value === null || $this->value === '') {
            $this->message = $this->attributeLabel . '不能为空';
            return false;
        }
        return true;
    }

    public function getMessage()
    {
        return $this->message;
    }
}